﻿using System;
using System.Collections.Generic;
using System.Text;
using System.Xml;

namespace Palsta.Core
{
    public class XslText : XslElement
    {

        /*
         * Constructors
         */ 
        public XslText(XmlNode xslNode)
            : base(xslNode)
        {
            _jsFunctionName = _functionPrefix + "text";
        }

        /*
         * Overrides
         */
        public override String GetFunctionDeclareScript()
        {
            String result = "function " + _jsFunctionName + "_" + _index.ToString() + "() { \r\n";
            result += "return '" + _xmlNode.InnerText + "';\r\n";
            result += "}\r\n";
            return result;
        }
    }
}
